from django.core.exceptions import ObjectDoesNotExist

def render_block(self,content=None,title=None,title_type=None,attributes={}):
    if not title_type:
        title_type = 'h3'
    assert title_type in ('h1','h2','h3','h4','h5','h6','h7')
    if content:
        output = []
        output.append(self.render_tag(title_type,title))
        output.append(self.escape(content))
        return self.render_tag('div',self.safe(u''.join(output)),attributes)
    return u''

def render_region(self,content=None,attributes={}):
    return self.render_tag('div',self.escape(content),attributes,allow_empty=True)

